﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Services;
using System.Web.Services.Protocols;

/// <summary>
/// Descripción breve de PracticaService
/// </summary>
public partial class Service
{
	#region "Practicas"

    [WebMethod]
    public string practicasAgregarPractica(string practicadesc, string practicacompleja, string practicacobertura)
    {
        return PracticasDA.insertPractica(practicadesc, practicacompleja, practicacobertura);
    }

    [WebMethod]
    public DataTable practicasListarPracticas()
    {
        return PracticasDA.selectPracticas();
    }

    [WebMethod]
    public string practicasModificarPracticas(string practicaid, string practicadesc, string practicacompleja, string practicacobertura)
    {
        return PracticasDA.updatePractica(practicaid, practicadesc, practicacompleja, practicacobertura);
    }

    [WebMethod]
    public string practicasEliminarPractica(string practicaid)
    {
        return PracticasDA.deletePractica(practicaid);
    }

    [WebMethod]
    public DataTable practicasBuscarPractica(string cadena)
    {
        return PracticasDA.buscarPractica(cadena);
    }

    [WebMethod]
    public DataTable practicasBuscarPracticasxPlan(string planid)
    {
        if (planid == "0")
        {
            return PracticasDA.selectPracticas();
        }
        else
        {
            return PracticasDA.selectPracticasxPlan(planid);
        }
    }

    #endregion
}

